<?php
// css einbinden für module  /layout/css/backend.css
if(!function_exists('gn2_insertCSS'))
{	function gn2_insertCSS($params)
	{	global $REX;			
		$content = $params['subject'];
		$insert = '
		<style type="text/css">
		
			/* mediapool fields look a little ugly without these lines */
			div.rex-fldst-wrppr
			{	background-color:#F0EFEB;
			}
			div.rex-wdgt
			{	margin-top:10px;
				margin-left:150px;
			}
			div.rex-wdgt div.rex-wdgt-mdlst p.rex-wdgt-fld
			{	width:250px;
			}
		
			/* Markitup Schönheit Fixes */
			span.redaxo_textile
			{	clear:left;
				display:block;
				margin-left:145px;
			}
			li.markItUpButton
			{	list-style-type:none !important;
				overflow:hidden;
			}
			
			.markItUp {
			border:5px solid #F5F5F5;
			margin:5px 0 5px 0;
			width:507px;
			}
			
			.markItUpEditor {
			width:485px !important;
			border:1px solid #cccccc;
			background:#ffffff;
			height:200px;
			padding:5px;
			}
			.markItUpContainer {
			border:1px solid #dadada;
			}
			
			.markItUpFooter {
			height:6px;
			padding-top:4px;
			}
		
		</style>
				
		';
		
		
		return str_replace('</head>', $insert.'</head>', $content);
	}
}
rex_register_extension('OUTPUT_FILTER', 'gn2_insertCSS');

// Parameter
$Basedir = dirname(__FILE__);

$page = rex_request('page', 'string');
$subpage = rex_request('subpage', 'string');
$func = rex_request('func', 'string');

include $REX['INCLUDE_PATH'].'/layout/top.php';

$subpages = array(
  					array('haendler',"Adressen"),
			  		array('branchen',"Branchen"),
					array('gebiete',"Gebiete")
  		);

rex_title("Branchenverzeichnis", $subpages);

switch($subpage)
{   case "branchen":
		require $Basedir .'/branchen.inc.php';
	break;
	case "gebiete":
		require $Basedir .'/gebiete.inc.php';
	break;
	default:
		require $Basedir .'/haendler.inc.php';
}

include $REX['INCLUDE_PATH'].'/layout/bottom.php';
?>